home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 July
/
EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso
/
earcd
/
comm
/
ums
/
pint.lha
/
UMS
/
Rexx
/
ApproveMsg.pint
< prev
next >
Wrap
Text File
|
1997-03-04
|
2KB
|
80 lines
/*
$VER: ApproveMsg.pint 1.0 (15.3.96)
Author:
Matthias Scheler <tron@lyssa.owl.de>
Updated for PINT (22.2.97):
Magnus Heino (nd95mho@Student.HGS.SE)
Thanks:
Kai Bolay <kai@studbox.uni-stuttgart.de>
Function:
adds RFC "Approved:" header to a message
History:
1.0 Initial version.
Requires:
UMS, PINT 2.0
Example for "ums.config":
( PINT.Rexx
...
"#?Window F7 ApproveMsg.pint\n"
...
)
*/
OPTIONS RESULTS
CALL ADDLIB('ums.library',0,-210,11)
CALL UMSInitConsts()
STATUS
IF RESULT~='MESSAGE' THEN EXIT 5
GETACCOUNT
OldAccount=RESULT
Account=UMSDupAccount(OldAccount)
GETMSGNUM
AppMsgNum=RESULT
DROP Message.
IF UMSReadMsgAll(Account,AppMsgNum,Message.,TRUE) THEN
DO
IF Symbol('Message.UMSCODE_GROUP')='VAR' THEN
DO
IF UMSReadMsgInfo(Account,AppMsgNum,info.) THEN
DO
IF BitTst(info.USERSTAT,UMSUSTAT_OWNER) THEN
DO
User=UMSReadConfig(Account,"rfc.username")
IF User="" THEN User="nobody"
Domain=UMSReadConfig(Account,"rfc.domainname")
IF Domain="" THEN Domain="no.where"
'REQUEST "ApproveMsg" "**_Yes|No" "Approve this message?"'
IF RESULT=1 THEN
DO
Message.UMSCODE_RFCATTR='"Approved: '||User||'@'||Domain||'"'
Message.MSGNUM =AppMsgNum
IF UMSWriteMsg(Account,Message.)~=0 THEN REDISPLAY
ELSE 'REQUEST "ApproveMsg" "**_OK" "Approve failed!"'
END
END
ELSE 'REQUEST "ApproveMsg" "**_OK" "You are not the owner of this message!"'
END
END
END
CALL UMSLogout(Account)